<?php

$line = array('BATCH_ID','BATCHPROCESS_DATE','MAC_ADDRESS','ACCOUNT_NUMBER','INTERACTION_ID','CREATED_DATE','INSERTED_BY','TYPE','PRODUCT','REASON','RESULT','TITLE');
$csv->addRow($line);



WHILE($row = mysql_fetch_array($result))
  { 
    $line = array($row["BATCH_ID"],$row["BATCHPROCESS_DATE"],$row["MAC_ADDRESS"],$row["ACCOUNT_NUMBER"],$row["INTERACTION_ID"],$row["CREATED_DATE"],$row["INSERTED_BY"],$row["TYPE"],$row["PRODUCT"],$row["REASON"],$row["RESULT"],$row["TITLE"]);
    $csv->addRow($line);
  }

$datum = date("d.m.Y");
$end = ".csv";
$title = "Export_Interactions_Details_".$datum.".csv";
echo $csv->render($title);
?>


 